#include <stdio.h>
#include <string.h>

int main(int argc, char**argv)
{
    //打开文件
    FILE*fp = fopen(argv[1], "a+");
    if(fp == NULL)
    {
        perror("fopen error:");
        return -1;
    }
    //写入数据
    char buf[128] = {"1234534534"};
    int re = fwrite(buf, 1,strlen(buf)+1, fp);
    fflush(NULL);
    //输出写入成功
    printf("re = %d\n", re);
    
    while(1);
   
}